class GreenSimulation < ActiveRecord::Base

  def self.get_green_power
     #t = (Time.now.strftime("%M").to_i * 24/60)
     t = UtilityFunctions.current_time[0]
     #t = (Time.now.strftime("%S.%3N").to_f * 24/60).floor
     green_power = GreenSimulation.where(:sim_hour => t).last
     #OutletStatus.where(:priority => '3') 
     return green_power.power.to_f
  end
  
end
